package cn.lngaosu.lwyd.module.integration.dal.mysql.weixinusernum;

import java.util.*;

import cn.lngaosu.lwyd.framework.common.pojo.PageResult;
import cn.lngaosu.lwyd.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.lngaosu.lwyd.framework.mybatis.core.mapper.BaseMapperX;
import cn.lngaosu.lwyd.module.integration.dal.dataobject.weixinusernum.WeixinUserNumDO;
import org.apache.ibatis.annotations.Mapper;
import cn.lngaosu.lwyd.module.integration.controller.admin.weixinusernum.vo.*;

/**
 * 微信公众号用户数量 Mapper
 *
 * @author 张恒
 */
@Mapper
public interface WeixinUserNumMapper extends BaseMapperX<WeixinUserNumDO> {

    default PageResult<WeixinUserNumDO> selectPage(WeixinUserNumPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<WeixinUserNumDO>()
                .betweenIfPresent(WeixinUserNumDO::getCreateTime, reqVO.getCreateTime())
                .eqIfPresent(WeixinUserNumDO::getTotalNum, reqVO.getTotalNum())
                .orderByDesc(WeixinUserNumDO::getId));
    }

}